package com.ailatrieuphu.dialog;

import android.app.Dialog;
import android.content.Context;
import android.widget.TextView;

import com.ailatrieuphu.R;
import com.ailatrieuphu.util.Util;

public class DialogWaitting extends Dialog {

	private TextView alert;
	private Context context;
	public DialogWaitting(Context context, String alert) {
		super(context);
		this.context=context;
		Util.iniDialog(this);
		setContentView(R.layout.dialog_waitting);
		this.alert = (TextView) findViewById(R.id.dialog_waitting_alert);
		this.alert.setText(alert);
		
	}
	
	
	public static DialogWaitting createAndShowDialogWaiting(Context context) {
		final DialogWaitting dialogWaitting = new DialogWaitting(context,"Dang dang nhap...");
		dialogWaitting.show();
		dialogWaitting.setCancelable(true);
//		new Thread(new Runnable() {
//			@Override
//			public void run() {
//				
//			}
//		}).start();
		return dialogWaitting;
	}

	public TextView getAlert() {
		return alert;
	}

	public void setAlert(TextView alert) {
		this.alert = alert;
	}

}
